{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "collapsed": true,
    "jupyter": {
     "outputs_hidden": true
    }
   },
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "E:\\anaconda\\lib\\site-packages\\pandas\\compat\\_optional.py:138: UserWarning: Pandas requires version '2.7.0' or newer of 'numexpr' (version '2.6.9' currently installed).\n",
      "  warnings.warn(msg, UserWarning)\n"
     ]
    }
   ],
   "source": [
    "import numpy as np\n",
    "import pandas as pd"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>name</th>\n",
       "      <th>语文</th>\n",
       "      <th>数学</th>\n",
       "      <th>外文</th>\n",
       "      <th>物理</th>\n",
       "      <th>编程</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>坎坷</td>\n",
       "      <td>47</td>\n",
       "      <td>96</td>\n",
       "      <td>79</td>\n",
       "      <td>55</td>\n",
       "      <td>81</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>温柔岁月</td>\n",
       "      <td>59</td>\n",
       "      <td>40</td>\n",
       "      <td>96</td>\n",
       "      <td>45</td>\n",
       "      <td>50</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>时空倒流</td>\n",
       "      <td>76</td>\n",
       "      <td>97</td>\n",
       "      <td>67</td>\n",
       "      <td>85</td>\n",
       "      <td>75</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>沐白</td>\n",
       "      <td>44</td>\n",
       "      <td>81</td>\n",
       "      <td>93</td>\n",
       "      <td>54</td>\n",
       "      <td>58</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>苏牧待</td>\n",
       "      <td>51</td>\n",
       "      <td>83</td>\n",
       "      <td>91</td>\n",
       "      <td>80</td>\n",
       "      <td>91</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>山河之志</td>\n",
       "      <td>51</td>\n",
       "      <td>88</td>\n",
       "      <td>87</td>\n",
       "      <td>69</td>\n",
       "      <td>56</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>萤火</td>\n",
       "      <td>86</td>\n",
       "      <td>57</td>\n",
       "      <td>88</td>\n",
       "      <td>69</td>\n",
       "      <td>50</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>烟火</td>\n",
       "      <td>81</td>\n",
       "      <td>68</td>\n",
       "      <td>93</td>\n",
       "      <td>66</td>\n",
       "      <td>71</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   name  语文  数学  外文  物理  编程\n",
       "0    坎坷  47  96  79  55  81\n",
       "1  温柔岁月  59  40  96  45  50\n",
       "2  时空倒流  76  97  67  85  75\n",
       "3    沐白  44  81  93  54  58\n",
       "4   苏牧待  51  83  91  80  91\n",
       "5  山河之志  51  88  87  69  56\n",
       "6    萤火  86  57  88  69  50\n",
       "7    烟火  81  68  93  66  71"
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "names = [\"坎坷\",\"温柔岁月\",\"时空倒流\",\"沐白\",\"苏牧待\",\"山河之志\",\"萤火\",\"烟火\"]\n",
    "num = len(names)\n",
    "data = pd.DataFrame({\"name\":names,\"语文\":np.random.randint(40,90,size=num),\n",
    "                    \"数学\":np.random.randint(30,99,size=num),\"外文\":np.random.randint(50,100,size=num),\n",
    "                    \"物理\":np.random.randint(40,100,size=num),\"编程\":np.random.randint(50,98,size=num)})\n",
    "data"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 计算与描述性统计"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0    47\n",
       "1    59\n",
       "2    76\n",
       "3    44\n",
       "4    51\n",
       "5    51\n",
       "6    86\n",
       "7    81\n",
       "Name: 语文, dtype: int32"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "chinese = data[\"语文\"]\n",
    "chinese"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0    47\n",
       "1    59\n",
       "2    76\n",
       "3    44\n",
       "4    51\n",
       "5    51\n",
       "6    86\n",
       "7    81\n",
       "Name: 语文, dtype: int32"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "chinese.abs() # 绝对值"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "True"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "chinese.any() # 是否存在为真的数"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "True"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "chinese.all() # 是否全部为真"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "8"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "chinese.count() # 非NaN元素的个数"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0    60\n",
       "1    60\n",
       "2    76\n",
       "3    60\n",
       "4    60\n",
       "5    60\n",
       "6    86\n",
       "7    81\n",
       "Name: 语文, dtype: int32"
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "chinese.clip(60,92) # 剪切，小于50的数为50，大于92的数为92"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "count     8.000000\n",
       "mean     61.875000\n",
       "std      16.617009\n",
       "min      44.000000\n",
       "25%      50.000000\n",
       "50%      55.000000\n",
       "75%      77.250000\n",
       "max      86.000000\n",
       "Name: 语文, dtype: float64"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "chinese.describe() # 整体描述统计"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(86, 44, 495, 61.875, 55.0)"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 最大，最小，总，平均，中位数\n",
    "chinese.max(),chinese.min(),chinese.sum(),chinese.mean(),chinese.median()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "6    86\n",
       "7    81\n",
       "2    76\n",
       "Name: 语文, dtype: int32"
      ]
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 前三名\n",
    "chinese.nlargest(3)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "3    44\n",
       "0    47\n",
       "4    51\n",
       "Name: 语文, dtype: int32"
      ]
     },
     "execution_count": 12,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 后三名\n",
    "chinese.nsmallest(3)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "51.0"
      ]
     },
     "execution_count": 13,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 前40%的位置\n",
    "chinese.quantile(0.4)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0    7\n",
       "1    4\n",
       "2    3\n",
       "3    8\n",
       "4    5\n",
       "5    6\n",
       "6    1\n",
       "7    2\n",
       "Name: 语文, dtype: int32"
      ]
     },
     "execution_count": 14,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 排名\n",
    "chinese.rank(axis=0,method=\"first\",na_option=\"bottom\",ascending=False).astype(\"int32\")\n",
    "# 相同排名取均值，method={‘average’, ‘min’, ‘max’, ‘first’, ‘dense’}\n",
    "# 非数值类型位置保持不变，na_option={‘keep’, ‘top’, ‘bottom’}\n",
    "# 默认在降序，ascending为False时为升序, 即越大的数，排名数越小，我们习惯的排名方式\n",
    "# pct：bool, default False 是否返回排名百分比"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0    0.875\n",
       "1    0.500\n",
       "2    0.375\n",
       "3    1.000\n",
       "4    0.625\n",
       "5    0.750\n",
       "6    0.125\n",
       "7    0.250\n",
       "Name: 语文, dtype: float64"
      ]
     },
     "execution_count": 15,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "chinese.rank(axis=0,method=\"first\",na_option=\"bottom\",ascending=False,pct=True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([47, 59, 76, 44, 51, 86, 81])"
      ]
     },
     "execution_count": 16,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 拿到没有重复的数据\n",
    "chinese.unique()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "7"
      ]
     },
     "execution_count": 17,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 返回非重复数据的数量\n",
    "chinese.nunique()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "51    2\n",
       "47    1\n",
       "59    1\n",
       "76    1\n",
       "44    1\n",
       "86    1\n",
       "81    1\n",
       "Name: 语文, dtype: int64"
      ]
     },
     "execution_count": 18,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 统计值出现的次数\n",
    "chinese.value_counts()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0     47\n",
       "1    106\n",
       "2    182\n",
       "3    226\n",
       "4    277\n",
       "5    328\n",
       "6    414\n",
       "7    495\n",
       "Name: 语文, dtype: int32"
      ]
     },
     "execution_count": 19,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 累加和\n",
    "# 类似的还有cumprod,cummax,cummin\n",
    "chinese.cumsum()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 索引相关的操作"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "True"
      ]
     },
     "execution_count": 20,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 是否包含某个索引\n",
    "7 in chinese"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>name</th>\n",
       "      <th>语文</th>\n",
       "      <th>数学</th>\n",
       "      <th>外文</th>\n",
       "      <th>物理</th>\n",
       "      <th>编程</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>坎坷</td>\n",
       "      <td>47</td>\n",
       "      <td>96</td>\n",
       "      <td>79</td>\n",
       "      <td>55</td>\n",
       "      <td>81</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>温柔岁月</td>\n",
       "      <td>59</td>\n",
       "      <td>40</td>\n",
       "      <td>96</td>\n",
       "      <td>45</td>\n",
       "      <td>50</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>时空倒流</td>\n",
       "      <td>76</td>\n",
       "      <td>97</td>\n",
       "      <td>67</td>\n",
       "      <td>85</td>\n",
       "      <td>75</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>沐白</td>\n",
       "      <td>44</td>\n",
       "      <td>81</td>\n",
       "      <td>93</td>\n",
       "      <td>54</td>\n",
       "      <td>58</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>苏牧待</td>\n",
       "      <td>51</td>\n",
       "      <td>83</td>\n",
       "      <td>91</td>\n",
       "      <td>80</td>\n",
       "      <td>91</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>山河之志</td>\n",
       "      <td>51</td>\n",
       "      <td>88</td>\n",
       "      <td>87</td>\n",
       "      <td>69</td>\n",
       "      <td>56</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>萤火</td>\n",
       "      <td>86</td>\n",
       "      <td>57</td>\n",
       "      <td>88</td>\n",
       "      <td>69</td>\n",
       "      <td>50</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>烟火</td>\n",
       "      <td>81</td>\n",
       "      <td>68</td>\n",
       "      <td>93</td>\n",
       "      <td>66</td>\n",
       "      <td>71</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   name  语文  数学  外文  物理  编程\n",
       "0    坎坷  47  96  79  55  81\n",
       "1  温柔岁月  59  40  96  45  50\n",
       "2  时空倒流  76  97  67  85  75\n",
       "3    沐白  44  81  93  54  58\n",
       "4   苏牧待  51  83  91  80  91\n",
       "5  山河之志  51  88  87  69  56\n",
       "6    萤火  86  57  88  69  50\n",
       "7    烟火  81  68  93  66  71"
      ]
     },
     "execution_count": 21,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "metadata": {},
   "outputs": [],
   "source": [
    "math = data[\"数学\"].copy()\n",
    "prog = data[\"编程\"].copy()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0    81\n",
       "1    50\n",
       "2    75\n",
       "3    58\n",
       "4    91\n",
       "5    56\n",
       "6    50\n",
       "7    71\n",
       "8    99\n",
       "Name: 编程, dtype: int32"
      ]
     },
     "execution_count": 23,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 重新排列索引，比原来多出来的索引对应的值作为缺失值，通过fill_value指定填充值\n",
    "# 结果测试，参数copy不起作用\n",
    "p = prog.reindex(index=range(0,9,1),fill_value=99)\n",
    "p"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 标签对齐，取得join方式决定的索引以及对应值后分别返回\n",
    "math2,prog2 = math.align(p,join=\"outer\",fill_value=0)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0    81\n",
       "1    50\n",
       "2    75\n",
       "3    58\n",
       "4    91\n",
       "5    56\n",
       "7    71\n",
       "Name: 编程, dtype: int32"
      ]
     },
     "execution_count": 25,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 把索引为6，8的行给删除\n",
    "p.drop(index=[6,8],inplace=False) "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 26,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0    False\n",
       "1    False\n",
       "2    False\n",
       "3    False\n",
       "4    False\n",
       "5     True\n",
       "6    False\n",
       "7    False\n",
       "Name: 语文, dtype: bool"
      ]
     },
     "execution_count": 26,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "chinese.duplicated(keep='first') # 判断是否重复\n",
    "# 判断重复，重复的第一个标记为不重复\n",
    "# keep {‘first’, ‘last’, False}, default ‘first’"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 27,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0    47\n",
       "1    59\n",
       "2    76\n",
       "3    44\n",
       "4    51\n",
       "6    86\n",
       "7    81\n",
       "Name: 语文, dtype: int32"
      ]
     },
     "execution_count": 27,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 删除重复行，保留第一个重复的行\n",
    "chinese.drop_duplicates(keep=\"first\",inplace=False)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 缺失值处理"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 28,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "坎坷      60\n",
       "温柔岁月    57\n",
       "时空倒流    94\n",
       "沐白      82\n",
       "苏牧待     96\n",
       "山河之志    76\n",
       "萤火      95\n",
       "烟火      69\n",
       "dtype: int32"
      ]
     },
     "execution_count": 28,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "biology = pd.Series(np.random.randint(55,101,size=num),index=names)\n",
    "biology"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 29,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "坎坷      60.0\n",
       "温柔岁月    57.0\n",
       "时空倒流    94.0\n",
       "沐白      82.0\n",
       "苏牧待     96.0\n",
       "山河之志    76.0\n",
       "萤火      95.0\n",
       "烟火      69.0\n",
       "青云       NaN\n",
       "高峰       NaN\n",
       "dtype: float64"
      ]
     },
     "execution_count": 29,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "b = biology.reindex(index=names+[\"青云\",\"高峰\"],fill_value=None)\n",
    "b"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 30,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "坎坷      False\n",
       "温柔岁月    False\n",
       "时空倒流    False\n",
       "沐白      False\n",
       "苏牧待     False\n",
       "山河之志    False\n",
       "萤火      False\n",
       "烟火      False\n",
       "青云       True\n",
       "高峰       True\n",
       "dtype: bool"
      ]
     },
     "execution_count": 30,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 是否是缺失值\n",
    "b.isna()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 31,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "坎坷       True\n",
       "温柔岁月     True\n",
       "时空倒流     True\n",
       "沐白       True\n",
       "苏牧待      True\n",
       "山河之志     True\n",
       "萤火       True\n",
       "烟火       True\n",
       "青云      False\n",
       "高峰      False\n",
       "dtype: bool"
      ]
     },
     "execution_count": 31,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 是否为非缺失值\n",
    "b.notna()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 32,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "坎坷      60.0\n",
       "温柔岁月    57.0\n",
       "时空倒流    94.0\n",
       "沐白      82.0\n",
       "苏牧待     96.0\n",
       "山河之志    76.0\n",
       "萤火      95.0\n",
       "烟火      69.0\n",
       "青云       0.0\n",
       "高峰       0.0\n",
       "dtype: float64"
      ]
     },
     "execution_count": 32,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 全部缺失值用0替代\n",
    "b.fillna(0)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 33,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "坎坷      60.0\n",
       "温柔岁月    57.0\n",
       "时空倒流    94.0\n",
       "沐白      82.0\n",
       "苏牧待     96.0\n",
       "山河之志    76.0\n",
       "萤火      95.0\n",
       "烟火      69.0\n",
       "青云      69.0\n",
       "高峰      69.0\n",
       "dtype: float64"
      ]
     },
     "execution_count": 33,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 向前填充,用上方的值来填充当前缺失值\n",
    "b.fillna(method=\"ffill\")\n",
    "# 当然还可以对每一列指定填充值，对于Series来说没有必要"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 35,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "坎坷      60.0\n",
       "温柔岁月    57.0\n",
       "时空倒流    94.0\n",
       "沐白      82.0\n",
       "苏牧待     96.0\n",
       "山河之志    76.0\n",
       "萤火      95.0\n",
       "烟火      69.0\n",
       "dtype: float64"
      ]
     },
     "execution_count": 35,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    " #把带有缺失值的行删除\n",
    "b.dropna(inplace=False)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 形状与排序"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 36,
   "metadata": {},
   "outputs": [],
   "source": [
    "import random as rnd"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 37,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[4, 6, 5, 8, 0, 9, 3, 1, 7, 2]"
      ]
     },
     "execution_count": 37,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "index = list(range(0,10,1))\n",
    "rnd.shuffle(index) # 原地打乱序列\n",
    "index"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 38,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "4     51\n",
       "6    100\n",
       "5     49\n",
       "8     80\n",
       "0     92\n",
       "9     73\n",
       "3     74\n",
       "1     92\n",
       "7     80\n",
       "2     92\n",
       "dtype: int32"
      ]
     },
     "execution_count": 38,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "s = pd.Series(np.random.randint(49,101,size=len(index)),index=index)\n",
    "s"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 39,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "4    2\n",
       "6    0\n",
       "5    5\n",
       "8    6\n",
       "0    3\n",
       "9    8\n",
       "3    4\n",
       "1    7\n",
       "7    9\n",
       "2    1\n",
       "dtype: int64"
      ]
     },
     "execution_count": 39,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 按从小到大的顺序，整理出排序值（从0开始）\n",
    "s.argsort() "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 40,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "6    100\n",
       "0     92\n",
       "1     92\n",
       "2     92\n",
       "8     80\n",
       "7     80\n",
       "3     74\n",
       "9     73\n",
       "4     51\n",
       "5     49\n",
       "dtype: int32"
      ]
     },
     "execution_count": 40,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 排序，默认从小到大依次排序\n",
    "s.sort_values(ascending=False,inplace=False,na_position=\"first\") "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 42,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0     49\n",
       "1     51\n",
       "2     73\n",
       "3     74\n",
       "4     80\n",
       "5     80\n",
       "6     92\n",
       "7     92\n",
       "8     92\n",
       "9    100\n",
       "dtype: int32"
      ]
     },
     "execution_count": 42,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "s.sort_values(ascending=True,ignore_index=True) # 忽略索引，重新生成连续的新索引"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 合并"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 43,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "坎坷      60.0\n",
       "温柔岁月    57.0\n",
       "时空倒流    94.0\n",
       "沐白      82.0\n",
       "苏牧待     96.0\n",
       "山河之志    76.0\n",
       "萤火      95.0\n",
       "烟火      69.0\n",
       "青云       NaN\n",
       "高峰       NaN\n",
       "dtype: float64"
      ]
     },
     "execution_count": 43,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "b"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 44,
   "metadata": {},
   "outputs": [],
   "source": [
    "b2 = pd.Series([71,86],index=[\"牛奶糖\",\"囱火残阳\"]) # 垂直方向合并"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 45,
   "metadata": {},
   "outputs": [],
   "source": [
    "b3 = b.append(b2,ignore_index=False)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 46,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "坎坷      60.0\n",
       "温柔岁月    57.0\n",
       "时空倒流    94.0\n",
       "沐白      82.0\n",
       "苏牧待     96.0\n",
       "山河之志    76.0\n",
       "萤火      95.0\n",
       "烟火      69.0\n",
       "青云       NaN\n",
       "高峰       NaN\n",
       "牛奶糖     71.0\n",
       "囱火残阳    86.0\n",
       "dtype: float64"
      ]
     },
     "execution_count": 46,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "b3"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 47,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "烟火     0\n",
       "牛奶糖    0\n",
       "dtype: int64"
      ]
     },
     "execution_count": 47,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 两名学生生物考试作弊，被记作零分\n",
    "b4 = pd.Series(0,index=[\"烟火\",\"牛奶糖\"])\n",
    "b4"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 50,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "坎坷      60.0\n",
       "温柔岁月    57.0\n",
       "时空倒流    94.0\n",
       "沐白      82.0\n",
       "苏牧待     96.0\n",
       "山河之志    76.0\n",
       "萤火      95.0\n",
       "烟火       0.0\n",
       "青云       NaN\n",
       "高峰       NaN\n",
       "牛奶糖      0.0\n",
       "囱火残阳    86.0\n",
       "dtype: float64"
      ]
     },
     "execution_count": 50,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 更新考试成绩名单\n",
    "b3.update(b4)\n",
    "b3"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 52,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 对于没有前来参加考试的学生（NaN），成绩也记作零分\n",
    "b3.fillna(0,inplace=True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 53,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "坎坷      60.0\n",
       "温柔岁月    57.0\n",
       "时空倒流    94.0\n",
       "沐白      82.0\n",
       "苏牧待     96.0\n",
       "山河之志    76.0\n",
       "萤火      95.0\n",
       "烟火       0.0\n",
       "青云       0.0\n",
       "高峰       0.0\n",
       "牛奶糖      0.0\n",
       "囱火残阳    86.0\n",
       "Name: name, dtype: float64"
      ]
     },
     "execution_count": 53,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "b3.name = \"name\"\n",
    "b3"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 62,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>name</th>\n",
       "      <th>生物</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>坎坷</td>\n",
       "      <td>60.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>温柔岁月</td>\n",
       "      <td>57.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>时空倒流</td>\n",
       "      <td>94.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>沐白</td>\n",
       "      <td>82.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>苏牧待</td>\n",
       "      <td>96.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>山河之志</td>\n",
       "      <td>76.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>萤火</td>\n",
       "      <td>95.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>烟火</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>青云</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>高峰</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>牛奶糖</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>囱火残阳</td>\n",
       "      <td>86.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "    name    生物\n",
       "0     坎坷  60.0\n",
       "1   温柔岁月  57.0\n",
       "2   时空倒流  94.0\n",
       "3     沐白  82.0\n",
       "4    苏牧待  96.0\n",
       "5   山河之志  76.0\n",
       "6     萤火  95.0\n",
       "7     烟火   0.0\n",
       "8     青云   0.0\n",
       "9     高峰   0.0\n",
       "10   牛奶糖   0.0\n",
       "11  囱火残阳  86.0"
      ]
     },
     "execution_count": 62,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "b6 = b3.reset_index().rename(columns={\"name\":\"生物\",\"index\":\"name\"})\n",
    "b6"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 63,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>name</th>\n",
       "      <th>语文</th>\n",
       "      <th>数学</th>\n",
       "      <th>外文</th>\n",
       "      <th>物理</th>\n",
       "      <th>编程</th>\n",
       "      <th>生物</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>坎坷</td>\n",
       "      <td>47</td>\n",
       "      <td>96</td>\n",
       "      <td>79</td>\n",
       "      <td>55</td>\n",
       "      <td>81</td>\n",
       "      <td>60.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>温柔岁月</td>\n",
       "      <td>59</td>\n",
       "      <td>40</td>\n",
       "      <td>96</td>\n",
       "      <td>45</td>\n",
       "      <td>50</td>\n",
       "      <td>57.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>时空倒流</td>\n",
       "      <td>76</td>\n",
       "      <td>97</td>\n",
       "      <td>67</td>\n",
       "      <td>85</td>\n",
       "      <td>75</td>\n",
       "      <td>94.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>沐白</td>\n",
       "      <td>44</td>\n",
       "      <td>81</td>\n",
       "      <td>93</td>\n",
       "      <td>54</td>\n",
       "      <td>58</td>\n",
       "      <td>82.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>苏牧待</td>\n",
       "      <td>51</td>\n",
       "      <td>83</td>\n",
       "      <td>91</td>\n",
       "      <td>80</td>\n",
       "      <td>91</td>\n",
       "      <td>96.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>山河之志</td>\n",
       "      <td>51</td>\n",
       "      <td>88</td>\n",
       "      <td>87</td>\n",
       "      <td>69</td>\n",
       "      <td>56</td>\n",
       "      <td>76.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>萤火</td>\n",
       "      <td>86</td>\n",
       "      <td>57</td>\n",
       "      <td>88</td>\n",
       "      <td>69</td>\n",
       "      <td>50</td>\n",
       "      <td>95.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>烟火</td>\n",
       "      <td>81</td>\n",
       "      <td>68</td>\n",
       "      <td>93</td>\n",
       "      <td>66</td>\n",
       "      <td>71</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   name  语文  数学  外文  物理  编程    生物\n",
       "0    坎坷  47  96  79  55  81  60.0\n",
       "1  温柔岁月  59  40  96  45  50  57.0\n",
       "2  时空倒流  76  97  67  85  75  94.0\n",
       "3    沐白  44  81  93  54  58  82.0\n",
       "4   苏牧待  51  83  91  80  91  96.0\n",
       "5  山河之志  51  88  87  69  56  76.0\n",
       "6    萤火  86  57  88  69  50  95.0\n",
       "7    烟火  81  68  93  66  71   0.0"
      ]
     },
     "execution_count": 63,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 将生物成绩增加到所以学科成绩单中\n",
    "d = data.merge(b6,how=\"left\",left_on=\"name\",right_on=\"name\")\n",
    "d"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 补充"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 64,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "坎坷      60.0\n",
       "温柔岁月    57.0\n",
       "时空倒流    94.0\n",
       "沐白      82.0\n",
       "苏牧待     96.0\n",
       "山河之志    76.0\n",
       "萤火      95.0\n",
       "烟火       0.0\n",
       "青云       0.0\n",
       "高峰       0.0\n",
       "牛奶糖      0.0\n",
       "囱火残阳    86.0\n",
       "Name: name, dtype: float64"
      ]
     },
     "execution_count": 64,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 复制索引与值\n",
    "bb = b3.copy()\n",
    "bb"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 65,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([ 51, 100,  49,  80,  92,  73,  74,  92,  80,  92])"
      ]
     },
     "execution_count": 65,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 转换为numpy类型\n",
    "s.to_numpy()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 67,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[51, 100, 49, 80, 92, 73, 74, 92, 80, 92]"
      ]
     },
     "execution_count": 67,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 转换为list类型，在pyecharts中经常需要转换成list类型\n",
    "s.to_list()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 68,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "坎坷      60\n",
       "温柔岁月    57\n",
       "时空倒流    94\n",
       "沐白      82\n",
       "苏牧待     96\n",
       "山河之志    76\n",
       "萤火      95\n",
       "烟火       0\n",
       "青云       0\n",
       "高峰       0\n",
       "牛奶糖      0\n",
       "囱火残阳    86\n",
       "Name: name, dtype: int32"
      ]
     },
     "execution_count": 68,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 转换类型\n",
    "bb.astype(\"int32\")"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 绘图"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 71,
   "metadata": {},
   "outputs": [],
   "source": [
    "import matplotlib.pyplot as plt"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 69,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "坎坷       60.0\n",
       "温柔岁月    117.0\n",
       "时空倒流    211.0\n",
       "沐白      293.0\n",
       "苏牧待     389.0\n",
       "山河之志    465.0\n",
       "萤火      560.0\n",
       "烟火      560.0\n",
       "青云      560.0\n",
       "高峰      560.0\n",
       "牛奶糖     560.0\n",
       "囱火残阳    646.0\n",
       "Name: name, dtype: float64"
      ]
     },
     "execution_count": 69,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "d = bb.cumsum()\n",
    "d"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 74,
   "metadata": {
    "collapsed": true,
    "jupyter": {
     "outputs_hidden": true
    }
   },
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "E:\\anaconda\\lib\\site-packages\\matplotlib\\backends\\backend_agg.py:211: RuntimeWarning: Glyph 22350 missing from current font.\n",
      "  font.set_text(s, 0.0, flags=flags)\n",
      "E:\\anaconda\\lib\\site-packages\\matplotlib\\backends\\backend_agg.py:211: RuntimeWarning: Glyph 22391 missing from current font.\n",
      "  font.set_text(s, 0.0, flags=flags)\n",
      "E:\\anaconda\\lib\\site-packages\\matplotlib\\backends\\backend_agg.py:211: RuntimeWarning: Glyph 28201 missing from current font.\n",
      "  font.set_text(s, 0.0, flags=flags)\n",
      "E:\\anaconda\\lib\\site-packages\\matplotlib\\backends\\backend_agg.py:211: RuntimeWarning: Glyph 26580 missing from current font.\n",
      "  font.set_text(s, 0.0, flags=flags)\n",
      "E:\\anaconda\\lib\\site-packages\\matplotlib\\backends\\backend_agg.py:211: RuntimeWarning: Glyph 23681 missing from current font.\n",
      "  font.set_text(s, 0.0, flags=flags)\n",
      "E:\\anaconda\\lib\\site-packages\\matplotlib\\backends\\backend_agg.py:211: RuntimeWarning: Glyph 26376 missing from current font.\n",
      "  font.set_text(s, 0.0, flags=flags)\n",
      "E:\\anaconda\\lib\\site-packages\\matplotlib\\backends\\backend_agg.py:211: RuntimeWarning: Glyph 26102 missing from current font.\n",
      "  font.set_text(s, 0.0, flags=flags)\n",
      "E:\\anaconda\\lib\\site-packages\\matplotlib\\backends\\backend_agg.py:211: RuntimeWarning: Glyph 31354 missing from current font.\n",
      "  font.set_text(s, 0.0, flags=flags)\n",
      "E:\\anaconda\\lib\\site-packages\\matplotlib\\backends\\backend_agg.py:211: RuntimeWarning: Glyph 20498 missing from current font.\n",
      "  font.set_text(s, 0.0, flags=flags)\n",
      "E:\\anaconda\\lib\\site-packages\\matplotlib\\backends\\backend_agg.py:211: RuntimeWarning: Glyph 27969 missing from current font.\n",
      "  font.set_text(s, 0.0, flags=flags)\n",
      "E:\\anaconda\\lib\\site-packages\\matplotlib\\backends\\backend_agg.py:211: RuntimeWarning: Glyph 27792 missing from current font.\n",
      "  font.set_text(s, 0.0, flags=flags)\n",
      "E:\\anaconda\\lib\\site-packages\\matplotlib\\backends\\backend_agg.py:211: RuntimeWarning: Glyph 30333 missing from current font.\n",
      "  font.set_text(s, 0.0, flags=flags)\n",
      "E:\\anaconda\\lib\\site-packages\\matplotlib\\backends\\backend_agg.py:211: RuntimeWarning: Glyph 33487 missing from current font.\n",
      "  font.set_text(s, 0.0, flags=flags)\n",
      "E:\\anaconda\\lib\\site-packages\\matplotlib\\backends\\backend_agg.py:211: RuntimeWarning: Glyph 29287 missing from current font.\n",
      "  font.set_text(s, 0.0, flags=flags)\n",
      "E:\\anaconda\\lib\\site-packages\\matplotlib\\backends\\backend_agg.py:211: RuntimeWarning: Glyph 24453 missing from current font.\n",
      "  font.set_text(s, 0.0, flags=flags)\n",
      "E:\\anaconda\\lib\\site-packages\\matplotlib\\backends\\backend_agg.py:211: RuntimeWarning: Glyph 23665 missing from current font.\n",
      "  font.set_text(s, 0.0, flags=flags)\n",
      "E:\\anaconda\\lib\\site-packages\\matplotlib\\backends\\backend_agg.py:211: RuntimeWarning: Glyph 27827 missing from current font.\n",
      "  font.set_text(s, 0.0, flags=flags)\n",
      "E:\\anaconda\\lib\\site-packages\\matplotlib\\backends\\backend_agg.py:211: RuntimeWarning: Glyph 20043 missing from current font.\n",
      "  font.set_text(s, 0.0, flags=flags)\n",
      "E:\\anaconda\\lib\\site-packages\\matplotlib\\backends\\backend_agg.py:211: RuntimeWarning: Glyph 24535 missing from current font.\n",
      "  font.set_text(s, 0.0, flags=flags)\n",
      "E:\\anaconda\\lib\\site-packages\\matplotlib\\backends\\backend_agg.py:211: RuntimeWarning: Glyph 33828 missing from current font.\n",
      "  font.set_text(s, 0.0, flags=flags)\n",
      "E:\\anaconda\\lib\\site-packages\\matplotlib\\backends\\backend_agg.py:211: RuntimeWarning: Glyph 28779 missing from current font.\n",
      "  font.set_text(s, 0.0, flags=flags)\n",
      "E:\\anaconda\\lib\\site-packages\\matplotlib\\backends\\backend_agg.py:211: RuntimeWarning: Glyph 28895 missing from current font.\n",
      "  font.set_text(s, 0.0, flags=flags)\n",
      "E:\\anaconda\\lib\\site-packages\\matplotlib\\backends\\backend_agg.py:211: RuntimeWarning: Glyph 38738 missing from current font.\n",
      "  font.set_text(s, 0.0, flags=flags)\n",
      "E:\\anaconda\\lib\\site-packages\\matplotlib\\backends\\backend_agg.py:211: RuntimeWarning: Glyph 20113 missing from current font.\n",
      "  font.set_text(s, 0.0, flags=flags)\n",
      "E:\\anaconda\\lib\\site-packages\\matplotlib\\backends\\backend_agg.py:211: RuntimeWarning: Glyph 39640 missing from current font.\n",
      "  font.set_text(s, 0.0, flags=flags)\n",
      "E:\\anaconda\\lib\\site-packages\\matplotlib\\backends\\backend_agg.py:211: RuntimeWarning: Glyph 23792 missing from current font.\n",
      "  font.set_text(s, 0.0, flags=flags)\n",
      "E:\\anaconda\\lib\\site-packages\\matplotlib\\backends\\backend_agg.py:211: RuntimeWarning: Glyph 29275 missing from current font.\n",
      "  font.set_text(s, 0.0, flags=flags)\n",
      "E:\\anaconda\\lib\\site-packages\\matplotlib\\backends\\backend_agg.py:211: RuntimeWarning: Glyph 22902 missing from current font.\n",
      "  font.set_text(s, 0.0, flags=flags)\n",
      "E:\\anaconda\\lib\\site-packages\\matplotlib\\backends\\backend_agg.py:211: RuntimeWarning: Glyph 31958 missing from current font.\n",
      "  font.set_text(s, 0.0, flags=flags)\n",
      "E:\\anaconda\\lib\\site-packages\\matplotlib\\backends\\backend_agg.py:211: RuntimeWarning: Glyph 22257 missing from current font.\n",
      "  font.set_text(s, 0.0, flags=flags)\n",
      "E:\\anaconda\\lib\\site-packages\\matplotlib\\backends\\backend_agg.py:211: RuntimeWarning: Glyph 27531 missing from current font.\n",
      "  font.set_text(s, 0.0, flags=flags)\n",
      "E:\\anaconda\\lib\\site-packages\\matplotlib\\backends\\backend_agg.py:211: RuntimeWarning: Glyph 38451 missing from current font.\n",
      "  font.set_text(s, 0.0, flags=flags)\n",
      "E:\\anaconda\\lib\\site-packages\\matplotlib\\backends\\backend_agg.py:180: RuntimeWarning: Glyph 22350 missing from current font.\n",
      "  font.set_text(s, 0, flags=flags)\n",
      "E:\\anaconda\\lib\\site-packages\\matplotlib\\backends\\backend_agg.py:180: RuntimeWarning: Glyph 22391 missing from current font.\n",
      "  font.set_text(s, 0, flags=flags)\n",
      "E:\\anaconda\\lib\\site-packages\\matplotlib\\backends\\backend_agg.py:180: RuntimeWarning: Glyph 28201 missing from current font.\n",
      "  font.set_text(s, 0, flags=flags)\n",
      "E:\\anaconda\\lib\\site-packages\\matplotlib\\backends\\backend_agg.py:180: RuntimeWarning: Glyph 26580 missing from current font.\n",
      "  font.set_text(s, 0, flags=flags)\n",
      "E:\\anaconda\\lib\\site-packages\\matplotlib\\backends\\backend_agg.py:180: RuntimeWarning: Glyph 23681 missing from current font.\n",
      "  font.set_text(s, 0, flags=flags)\n",
      "E:\\anaconda\\lib\\site-packages\\matplotlib\\backends\\backend_agg.py:180: RuntimeWarning: Glyph 26376 missing from current font.\n",
      "  font.set_text(s, 0, flags=flags)\n",
      "E:\\anaconda\\lib\\site-packages\\matplotlib\\backends\\backend_agg.py:180: RuntimeWarning: Glyph 26102 missing from current font.\n",
      "  font.set_text(s, 0, flags=flags)\n",
      "E:\\anaconda\\lib\\site-packages\\matplotlib\\backends\\backend_agg.py:180: RuntimeWarning: Glyph 31354 missing from current font.\n",
      "  font.set_text(s, 0, flags=flags)\n",
      "E:\\anaconda\\lib\\site-packages\\matplotlib\\backends\\backend_agg.py:180: RuntimeWarning: Glyph 20498 missing from current font.\n",
      "  font.set_text(s, 0, flags=flags)\n",
      "E:\\anaconda\\lib\\site-packages\\matplotlib\\backends\\backend_agg.py:180: RuntimeWarning: Glyph 27969 missing from current font.\n",
      "  font.set_text(s, 0, flags=flags)\n",
      "E:\\anaconda\\lib\\site-packages\\matplotlib\\backends\\backend_agg.py:180: RuntimeWarning: Glyph 27792 missing from current font.\n",
      "  font.set_text(s, 0, flags=flags)\n",
      "E:\\anaconda\\lib\\site-packages\\matplotlib\\backends\\backend_agg.py:180: RuntimeWarning: Glyph 30333 missing from current font.\n",
      "  font.set_text(s, 0, flags=flags)\n",
      "E:\\anaconda\\lib\\site-packages\\matplotlib\\backends\\backend_agg.py:180: RuntimeWarning: Glyph 33487 missing from current font.\n",
      "  font.set_text(s, 0, flags=flags)\n",
      "E:\\anaconda\\lib\\site-packages\\matplotlib\\backends\\backend_agg.py:180: RuntimeWarning: Glyph 29287 missing from current font.\n",
      "  font.set_text(s, 0, flags=flags)\n",
      "E:\\anaconda\\lib\\site-packages\\matplotlib\\backends\\backend_agg.py:180: RuntimeWarning: Glyph 24453 missing from current font.\n",
      "  font.set_text(s, 0, flags=flags)\n",
      "E:\\anaconda\\lib\\site-packages\\matplotlib\\backends\\backend_agg.py:180: RuntimeWarning: Glyph 23665 missing from current font.\n",
      "  font.set_text(s, 0, flags=flags)\n",
      "E:\\anaconda\\lib\\site-packages\\matplotlib\\backends\\backend_agg.py:180: RuntimeWarning: Glyph 27827 missing from current font.\n",
      "  font.set_text(s, 0, flags=flags)\n",
      "E:\\anaconda\\lib\\site-packages\\matplotlib\\backends\\backend_agg.py:180: RuntimeWarning: Glyph 20043 missing from current font.\n",
      "  font.set_text(s, 0, flags=flags)\n",
      "E:\\anaconda\\lib\\site-packages\\matplotlib\\backends\\backend_agg.py:180: RuntimeWarning: Glyph 24535 missing from current font.\n",
      "  font.set_text(s, 0, flags=flags)\n",
      "E:\\anaconda\\lib\\site-packages\\matplotlib\\backends\\backend_agg.py:180: RuntimeWarning: Glyph 33828 missing from current font.\n",
      "  font.set_text(s, 0, flags=flags)\n",
      "E:\\anaconda\\lib\\site-packages\\matplotlib\\backends\\backend_agg.py:180: RuntimeWarning: Glyph 28779 missing from current font.\n",
      "  font.set_text(s, 0, flags=flags)\n",
      "E:\\anaconda\\lib\\site-packages\\matplotlib\\backends\\backend_agg.py:180: RuntimeWarning: Glyph 28895 missing from current font.\n",
      "  font.set_text(s, 0, flags=flags)\n",
      "E:\\anaconda\\lib\\site-packages\\matplotlib\\backends\\backend_agg.py:180: RuntimeWarning: Glyph 38738 missing from current font.\n",
      "  font.set_text(s, 0, flags=flags)\n",
      "E:\\anaconda\\lib\\site-packages\\matplotlib\\backends\\backend_agg.py:180: RuntimeWarning: Glyph 20113 missing from current font.\n",
      "  font.set_text(s, 0, flags=flags)\n",
      "E:\\anaconda\\lib\\site-packages\\matplotlib\\backends\\backend_agg.py:180: RuntimeWarning: Glyph 39640 missing from current font.\n",
      "  font.set_text(s, 0, flags=flags)\n",
      "E:\\anaconda\\lib\\site-packages\\matplotlib\\backends\\backend_agg.py:180: RuntimeWarning: Glyph 23792 missing from current font.\n",
      "  font.set_text(s, 0, flags=flags)\n",
      "E:\\anaconda\\lib\\site-packages\\matplotlib\\backends\\backend_agg.py:180: RuntimeWarning: Glyph 29275 missing from current font.\n",
      "  font.set_text(s, 0, flags=flags)\n",
      "E:\\anaconda\\lib\\site-packages\\matplotlib\\backends\\backend_agg.py:180: RuntimeWarning: Glyph 22902 missing from current font.\n",
      "  font.set_text(s, 0, flags=flags)\n",
      "E:\\anaconda\\lib\\site-packages\\matplotlib\\backends\\backend_agg.py:180: RuntimeWarning: Glyph 31958 missing from current font.\n",
      "  font.set_text(s, 0, flags=flags)\n",
      "E:\\anaconda\\lib\\site-packages\\matplotlib\\backends\\backend_agg.py:180: RuntimeWarning: Glyph 22257 missing from current font.\n",
      "  font.set_text(s, 0, flags=flags)\n",
      "E:\\anaconda\\lib\\site-packages\\matplotlib\\backends\\backend_agg.py:180: RuntimeWarning: Glyph 27531 missing from current font.\n",
      "  font.set_text(s, 0, flags=flags)\n",
      "E:\\anaconda\\lib\\site-packages\\matplotlib\\backends\\backend_agg.py:180: RuntimeWarning: Glyph 38451 missing from current font.\n",
      "  font.set_text(s, 0, flags=flags)\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAlYAAAE9CAYAAADJfiwbAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjAsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+17YcXAAASyUlEQVR4nO3db4xlZ10H8O+PLqDBPwU6bZrdxsGwUXgDNJtaQ2KUGqWscfuCJhgDG1Kzb6rRYKKrLzQmvljfCJKYmg1FF6Nig5puaEWbAjEmtjIVrEIxXZuVbrZ2B6H1D0FEH1/M2TC0087tzHN3zzP9fJLJPec5z5z7nZtzb74599w71VoLAAC795LLHQAAYK9QrAAAOlGsAAA6UawAADpRrAAAOlGsAAA62Xe5AyTJVVdd1VZXVy93DACAbT300ENfbK2tbLVtFsVqdXU1a2trlzsGAMC2qupfnmubtwIBADpRrAAAOlGsAAA6UawAADpRrAAAOlGsAAA6UawAADpRrAAAOlGsAAA6UawAADpRrAAAOpnF/woEAHg+q8fvWdq+z5443G1fzlgBAHSiWAEAdKJYAQB0olgBAHSiWAEAdKJYAQB0olgBAHSiWAEAdKJYAQB0olgBAHSiWAEAdKJYAQB0olgBAHSiWAEAdLJQsaqqK6vqI1X1+ap6pKq+v6peVVX3VdWj0+0rp7lVVe+vqjNV9XBVXb/cPwEAYB4WPWP1W0k+1lr73iRvSPJIkuNJ7m+tHUxy/7SeJDcnOTj9HEtyR9fEAAAztW2xqqrvSPIDSe5Mktba11prTyU5kuTUNO1Uklum5SNJPtQ2PJDkyqq6tntyAICZWeSM1XcnWU/yu1X16ar6QFW9Isk1rbUnkmS6vXqavz/J45t+/9w09k2q6lhVrVXV2vr6+q7+CACAOVikWO1Lcn2SO1prb0ryX/nG235bqS3G2rMGWjvZWjvUWju0srKyUFgAg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sQIsw1xeW5yxmpdZXHi3QyNn59JyrADLMIvXFsVqXmZx4d0OjZydS8uxAizDLF5bXnIp7oSFzeLCux0aOTuXlmMFWIZZvLY4YzUvs7jwbodGzs6l5VgBlmEWry2K1byM+kmMZOzsXFqOFWAZZvHa4lOBAACduMYKAKATxQoAoBPFCgCgE8UKAKATxQoAoJP/Bya2QAVBNV/kAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 720x360 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.figure(figsize=(10,5))\n",
    "d.plot.bar();"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
